#include<stdio.h>

int main()
{
    char c;
    while ((c = getchar()) != '\n')
    {
        if (c >= 'A' && c <= 'Z')
        {
            c = 155 - c;
        }
        printf("%c", c);
    }

    return 0;
}